<?php include $this->admin_tpl('meta', 'admin');?>
<title>管理轮播分类 - YzmCMS内容管理系统</title>
</head>
<body>
<article class="page-container">
<div class="formdoby_normal"> 
	<form method="post" action="" id="myform" onsubmit="return checkall(this)">
		<ul>
		<li>
			<button name="dosubmit" class="btn btn-danger radius" type="submit"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</button>
			<input class="btn w_120 btn-default radius" type="button" value="关闭" onclick="yzmcms_close()">
		</li> 
		<li>&nbsp;&nbsp;<span style="width:50px;display:inline-block">分类ID</span> <span style="width:100px;display:inline-block">分类名称</span></li> 
		<?php 
		foreach($data as $val){
		?>
			<li><label style="width:60px;">&nbsp;&nbsp;<input type="checkbox" value="<?php echo $val['tid']?>" name="id[]"> <?php echo $val['tid']?></label> <?php echo $val['name']?></li> 
		<?php 
		}
		?>
		</ul>
		
	</form>
</div>
</article>
<?php include $this->admin_tpl('footer','admin');?> 
<script type="text/javascript">

function checkall(obj){
		if ($("input[name='id[]']:checked").length<1){
		   layer.alert('请勾选信息！');
		   return false;
		}

		layer.confirm('确认要删除吗？',function(index){
			$.ajax({
				type: 'POST',
				url: '<?php echo U('cat_manage');?>', 
				data: $(obj).serialize(),
				dataType: "json", 
				success: function (msg) {
					if(msg.status == 1){
						parent.location.reload();       
					}else{
						layer.msg(msg.message);
					}
				}
			})
		});
		
		 
		return false;

}
</script>
</body>
</html>